import request from '../request/index.js'


// 获取验证码
export function getCodeImg() {
    return request({
        url: '/captchaImage',
        headers: {
            isToken: false
        },
        method: 'get',
        timeout: 20000
    })
}

export function login(username, password, code, uuid) {
    const data = {
        username,
        password,
        code,
        uuid
    }

    return postRequest(
        '/login',
        data,
    )
}

// 对postRequest方法封装
function postRequest(url,data)
{
   return  request.post(url,data);
}